﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="产品加工合同.aspx.cs" Inherits="syc.Sale.产品加工合同" %>

<html>
<head>
<title></title>
</head>
<body>
<script type="text/javascript" language="javascript" src="/common.js"></script>
<form id="form1" runat="server">
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
SelectCommand="if not @ID=0
begin
SELECT @编号=t1.编号,@中标ID=t1.中标ID,@材料ID=t1.材料ID,@供货ID=t1.供货ID
,@年度=t1.年度,@季度=t1.季度,@数量=t1.数量,@单价=t1.单价,@长度=t1.长度
,@签订日期=t1.签订日期,@交货时间=t1.交货时间,@运输方式=isnull(t1.运输方式,''),@备注=isnull(t1.备注,''),@交货数量=t1.交货数量
,@交货数量1=t1.交货数量1,@交货数量2=t1.交货数量2,@交货数量3=t1.交货数量3,@交货数量4=t1.交货数量4,@交货数量5=t1.交货数量5
,@交货数量6=t1.交货数量6,@交货数量7=t1.交货数量7,@交货数量8=t1.交货数量8,@交货数量9=t1.交货数量9
,@材料类别=t2.品名,@规格=isnull(t2.规格,''),@单位=t2.单位,@供货单位=isnull(t3.详细名称,t3.名称) FROM 采购材料合同 t1
left outer join 物料品种 t2 on t2.ID=t1.材料ID
left outer join 辅料供货单位 t3 on t3.ID=t1.供货ID where t1.ID=@ID;
end"
ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
    onselected="SqlDataSource1_Selected" >
<SelectParameters>
<asp:Parameter Name="ID" DbType="Int32" Size="4" DefaultValue="0" />
<asp:Parameter Name="编号" DbType="AnsiString" Size="20" Direction="Output"/>
<asp:Parameter Name="中标ID" DbType="Int32" Size="4" DefaultValue="0"/>
<asp:Parameter Name="材料ID" DbType="Int32" Size="4" Direction="Output" />
<asp:Parameter Name="供货ID" DbType="Int32" Size="4" Direction="Output" />

<asp:Parameter Name="年度" DbType="Int32" Size="4" Direction="Output" />
<asp:Parameter Name="季度" DbType="Byte" Size="1" Direction="Output"/>
<asp:Parameter Name="数量" DbType="Double"  Size="9" Direction="Output"/>
<asp:Parameter Name="单价" DbType="Double" Size="8" Direction="Output"/>
<asp:Parameter Name="长度" DbType="Double"  Size="9" Direction="Output"/>

<asp:Parameter Name="签订日期" DbType="Date"  Size="3" Direction="Output"/>
<asp:Parameter Name="交货时间" DbType="Date"  Size="3" Direction="Output"/>
<asp:Parameter Name="运输方式" DbType="String"  Size="20" Direction="Output"/>
<asp:Parameter Name="备注" DbType="String"  Size="200" Direction="Output"/>
<asp:Parameter Name="交货数量" DbType="Double"  Size="9" Direction="Output"/>

<asp:Parameter Name="交货数量1" DbType="Double"  Size="9" Direction="Output"/>
<asp:Parameter Name="交货数量2" DbType="Double"  Size="9" Direction="Output"/>
<asp:Parameter Name="交货数量3" DbType="Double"  Size="9" Direction="Output"/>
<asp:Parameter Name="交货数量4" DbType="Double"  Size="9" Direction="Output"/>
<asp:Parameter Name="交货数量5" DbType="Double"  Size="9" Direction="Output"/>

<asp:Parameter Name="交货数量6" DbType="Double"  Size="9" Direction="Output"/>
<asp:Parameter Name="交货数量7" DbType="Double"  Size="9" Direction="Output"/>
<asp:Parameter Name="交货数量8" DbType="Double"  Size="9" Direction="Output"/>
<asp:Parameter Name="交货数量9" DbType="Double"  Size="9" Direction="Output"/>
<asp:Parameter Name="材料类别" DbType="String"  Size="40" Direction="Output"/>

<asp:Parameter Name="规格" DbType="String"  Size="40" Direction="Output"/>
<asp:Parameter Name="供货单位" DbType="String"  Size="40" Direction="Output"/>
<asp:Parameter Name="单位" DbType="String"  Size="20" Direction="Output"/>

</SelectParameters>
</asp:SqlDataSource>
<asp:Label ID="DanWei" runat="server" Text="" Visible="false"></asp:Label>


<div id="wintop" class="wintop" style="display:none;">辅料采购合同</div>

<asp:Panel ID="Panel1" runat="server" CssClass="panel">
<input type="button" value="导出Excel" class="button" onclick="Export();" />
<input type="button" value="关 闭" class="button" onclick="parent.swin2_close();" />
</asp:Panel>
<div id=content style="padding:15px;text-align:center;">
<style>
td{font-size:11pt;font-family:宋体;}
td.tt{border:0.5pt solid #000000;text-align:center;font-size:10pt;}
    .style1
    {
        height: 27px;
    }
    .style2
    {
        height: 20px;
    }
 p.MsoNormal
	{margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.5pt;
	font-family:"Times New Roman";
	    margin-left: 0cm;
        margin-right: 0cm;
        margin-top: 0cm;
    }
 </style>
<table border="0" cellpadding="0" style="border-collapse: collapse;">
<tr style="height:0pt;">
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
<td style="width:14pt;"></td>
</tr>
<tr>
<td colspan=36 style="text-align:center;font-size:18pt;height:36pt;"><b>产品加工合同</b></td>
</tr>
<tr>
<td colspan=3></td>
<td colspan=21 class="style2">委托方：陕西延长石油材料有限责任公司 (甲方)</td>
<td colspan=12>合同编号：<asp:Label ID="BianHao" runat="server" Text=""></asp:Label></td>
</tr>
<tr>
<td colspan=3></td>
<td colspan=15 class="style2">承揽方：<asp:Label ID="GongHuo" runat="server" Text=""></asp:Label>&nbsp;(乙方)</td>
<td colspan=6></td>
<td colspan=12 >签订地点：西安</td>
</tr>
<tr>
<td colspan=3></td>
<td colspan=15 class="style2">签订时间：<%=DateTime.Today.Year%>年   月   日</td>
<td colspan=6></td>
<td colspan=12>&nbsp;</td>
</tr>
<tr>
<td colspan=36 style="padding:3pt;" class="style1">
    一、<span style="font-size:12.0pt;font-family:仿宋_GB2312;
mso-hansi-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;;
mso-font-kerning:1.0pt;mso-ansi-language:EN-US;mso-fareast-language:ZH-CN;
mso-bidi-language:AR-SA">产品名称、型号、产家、数量、单价、金额</span></td>
</tr>
<%for (int i = 0; i < id_length.Length; i++)
  { if(id_length[i]!=0){%>
<tr>
<td class=tt colspan=4><b>产品名称</b></td>
<td class=tt colspan=6><b>规格</b></td>
<td class=tt colspan=3><b>单位</b></td>
<td class=tt colspan=6><b>数量</b></td>
<td class=tt colspan=6><b>单价</b>(含税)</td>
<td class=tt colspan=5><b>金额</b>(元)</td>

</tr>
<tr>
<td class=tt colspan=4><%=产品[i] %></td>
<td class=tt colspan=6><%=规格[i] %></td>
<td class=tt colspan=3><%=单位[i] %></td>
<td class=tt colspan=6><%=数量[i] %></td>
<td class=tt colspan=6><%=单价[i]%></td>
<td class=tt colspan=5><%=金额[i] %></td>

</tr>
<tr>
<td class=tt colspan=8>合计人民币大写:</td>

<td class=tt colspan=22 style="text-align:left;"><div tabindex=0 contentEditable >&nbsp;&nbsp;<%=金额大写[i]%> &nbsp;&nbsp;
    <span lang="EN-US" style="font-size:12.0pt;font-family:
仿宋_GB2312;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;;
mso-font-kerning:1.0pt;mso-ansi-language:EN-US;mso-fareast-language:ZH-CN;
mso-bidi-language:AR-SA">(</span><span style="font-size:12.0pt;font-family:
仿宋_GB2312;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;;
mso-font-kerning:1.0pt;mso-ansi-language:EN-US;mso-fareast-language:ZH-CN;
mso-bidi-language:AR-SA">含<span lang="EN-US">17%</span>增值税<span lang="EN-US">)</span></span></div></td>
</tr>
<%}} %>
<tr><td colspan=36 class="style1"><div tabindex=0 contentEditable >二、质量要求：按双方签订协议执行。</div></td></tr>
<tr><td colspan=36 class="style1"><div tabindex=0 contentEditable >三、交货地点与方式：需方仓库。</div></td></tr>
<tr><td colspan=36 class="style1"><div tabindex=0 contentEditable >四、运输方式及费用承担：乙方负责废料及成品的装卸、运输,运费由乙方承担。</div></td></tr>
<tr><td colspan=36 class="style1"><div tabindex=0 contentEditable >五、合理损耗及计算方式：每吨≤4%损耗。</div></td></tr>
<tr><td colspan=36 class="style1"><div tabindex=0 contentEditable >六、包装标准、包装物的供应与回收：塑料袋包装不回收。</div></td></tr>
<tr><td colspan=36 class="style1"><div tabindex=0 contentEditable >七、验收标准、方法及提出异议期限：如有质量及数量问题，保留实物10日内提出异议，不合格品退回</div></td></tr>
<tr><td colspan=36 class="style1"><div tabindex=0 contentEditable >&nbsp;&nbsp;&nbsp; 供方。</div></td>   
<tr><td colspan=36 class="style1"><div tabindex=0 contentEditable >八、结算方式及期限：货到验收合格后，凭发票在财务挂账后付款。</div></td></tr>
<tr><td colspan=36 class="style1"><div tabindex=0 contentEditable >九、如需提供担保，另立合同担保书，做本合同附件：无。</div></td></tr>
<tr><td colspan=36 class="style1"><div tabindex=0 contentEditable >十、违约责任：按照《中华人民共和国合同法》有关条款执行。</div></td></tr>
<tr><td colspan=36 class="style1"><div tabindex=0 contentEditable >十一、解决合同纠纷的方式：双方协商解决，协商不成由西安仲裁委员会仲裁。</div></td></tr>
<tr><td colspan=36 class="style1"><div tabindex=0 contentEditable >十二、其它约定事项：无。</td></tr>
<tr><td colspan=36 class="style1"><div tabindex=0 contentEditable >十三、招标文件均为本合同的组成部分，解释顺序为合同—招标文件—投标文件-中标通知书。</div></td></tr>
<tr><td colspan=36 class="style1"><div tabindex=0 contentEditable >十四、合同有效期：自合同签订之日起至本合同履行完毕。</div></td></tr>
<td class=tt colspan=16 style="font-size:11pt;">供方</td>
<td class=tt colspan=20 style="font-size:11pt;">需方</td>

</tr>
<tr>
<td class=tt colspan=16 style="font-size:11pt;text-align:left;padding:3pt;">
供方(章)：<br>
<div id="gh"></div>  

<br>住所：<asp:Label ID="Address" runat="server" Width="120px"></asp:Label>
&nbsp;<br>法定代表人：
<br>委托代理人：
<br>经 办 人：
<br>电话(传真)：<asp:Label ID="Tele" runat="server" Width="100px"></asp:Label>
<br>开户银行： 
    <asp:Label ID="Bank" runat="server" Width="110px"></asp:Label>
<br>账号： 
    <asp:Label ID="Num" runat="server" Width="110px"></asp:Label>
<br>税号： 
    <asp:Label ID="Tax" runat="server" Width="110px"></asp:Label>
<br>邮政编码： 
    <asp:Label ID="Zip" runat="server" Width="110px"></asp:Label>
</td>
<td class=tt colspan=20 style="font-size:11pt;text-align:left;padding:3pt;">
需方(章)：<br>
陕西延长石油材料有限责任公司
<br>
<br>住所：西安枣园东路2号
<br>法定代表人：
<br>委托代理人：
<br>经 办 人：
<br>电话(传真)：029-84622862
<br>开户银行：上海浦东发展银行西安桃园路支行
<br>账号：72060154700000459
<br>税号：61010479076387X
<br>邮政编码：710077
</td>

</tr>
</table>

</div>

</form>
<asp:Label ID="Supplier" runat="server" Width="140px" Visible="true"></asp:Label>
<form id="form2" method="post" action="/PageExport.ashx">
<input type="hidden" name="filename" value="合同.xls" />
<input type="hidden" name="content" value="" />
</form>

<script >
    document.getElementById("Supplier").style.display = "none";
    document.getElementById("Supplier").onchange = function() {
        document.getElementById("gh").innerHTML = document.getElementById("Supplier").innerHTML;
    };
    document.getElementById("Supplier").onchange();
    //导出Excel
    function Export() {
        form2.content.value =
"<html xmlns:o='urn:schemas-microsoft-com:office:office'\nxmlns:x='urn:schemas-microsoft-com:office:excel'\nxmlns='http://www.w3.org/TR/REC-html40'>\n<head>\n<meta http-equiv=Content-Type content='text/html; charset=utf-8'>\n<style>\n<!--table\n@page\n{mso-header-data:;\nmso-footer-data:;\nmargin:.79in .31in .79in .31in;\nmso-header-margin:.51in;\nmso-footer-margin:.51in;\nmso-horizontal-page-align:center;\n}\n-->\n</style>\n<!--[if gte mso 9]><xml>\n<x:ExcelWorkbook>\n<x:ExcelWorksheets>\n<x:ExcelWorksheet>\n<x:Name>合同</x:Name>\n<x:WorksheetOptions>\n<x:DefaultRowHeight>285</x:DefaultRowHeight>\n<x:Print>\n<x:ValidPrinterInfo/>\n<x:Scale>100</x:Scale>\n<x:PaperSizeIndex>9</x:PaperSizeIndex>\n<x:HorizontalResolution>200</x:HorizontalResolution>\n<x:VerticalResolution>200</x:VerticalResolution>\n</x:Print>\n<x:Selected/>\n<x:Panes>\n<x:Pane>\n<x:Number>3</x:Number>\n<x:ActiveRow>0</x:ActiveRow>\n<x:ActiveCol>0</x:ActiveCol>\n</x:Pane>\n</x:Panes>\n</x:WorksheetOptions>\n</x:ExcelWorksheet>\n</x:ExcelWorkbook>\n</xml><![endif]-->\n</head>\n<body>"
            + document.getElementById("content").innerHTML+"</body></html>";
        form2.submit();
    }

</script>
</body>
</html>

